package Game.Spawners;

import java.util.ArrayList;
import java.util.List;

import org.newdawn.slick.SlickException;

import Game.Level;
import Game.Objects.GOAltar;
import GameMath.GPoint;

/** Spawn Altar class
 * @author Aikidos
 */
public class SpawnAltar extends SpawnerBase {

	@Override
	public void spawn(Level level) throws SlickException {
		if (!level.isUndergroundTown()) {
			List<GPoint> banCoords = new ArrayList<GPoint>();
			banCoords.add(level.getObjectManager().getPlayer().getCoord());
			banCoords.add(level.getObjectManager().getObjectsByClass("Game.Objects.GOLever")[0].getCoord());
			banCoords.add(level.getObjectManager().getObjectsByClass("Game.Objects.GOTrapdoor")[0].getCoord());
		
			level.getObjectManager().spawnObject(new GOAltar(level.getObjectManager()), banCoords);
		}
	}
	
}
